package itesm.coler.data;

import java.util.ArrayList;
import java.util.Collection;

import javax.sql.RowSet;

import itesm.coler.models.Message;

public interface MessageDAO {

	 /**
     * Returns a list of all Messages from the database ordered by Message ID. The list is never null and
     * is empty when the database does not contain any Message.
     * @return A list of all Messages from the database ordered by Message ID.
     * @throws DAOException If something fails at database level.
     */
    public ArrayList<Message> findAll() throws DAOException;

    /**
     * Returns the Messages from the database matching the given MessageId, otherwise null.
     * @param MessageId The MessageId of the Message to be returned.
     * @return The Message from the database matching the given MessageId, otherwise null.
     * @throws DAOException If something fails at database level.
     */
    public Message findMessageByMessageId(int messageId) throws DAOException;
	 
    /**
     * Returns the Messages from the database matching the given MessageTypeId, otherwise null.
     * @param MessageTypeId The MessageTypeId of the Messages to be returned.
     * @return A list of all Messages from the database matching the given MessageTypeId, otherwise null.
     * @throws DAOException If something fails at database level.
     */
    public ArrayList<Message> findMessageByMessageTypeId(String messageTypeId) throws DAOException;
    
}
